package apiday06.homework.exception;

public class Person {
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) throws InterruptedException {
        if (age < 0 || age > 100) {
            throw new InterruptedException("年龄不合法，非法年龄为：" + age);
        }
        this.age = age;
    }
}
